#include<bits/stdc++.h>

using namespace std;
using ll = long long;
#define endl '\n'

#define REP(i, x, y) for (auto i = (x), _##i = (y); i < _##i; ++i)
#define PER(i, x, y) for (auto i = (x), _##i = (y); i > _##i; --i)

template<class T=int>
inline void OO(const T &coll, const char *del = ",") {
    copy(coll.begin(), coll.end(), ostream_iterator<decltype(*coll.begin())>(cerr, del));
    cerr << endl;
}

const int maxn = 1e5 + 100;
int a[maxn], dp[maxn], n, T;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    while (cin >> n) {
        REP(i, 0, n)cin >> a[i];
        dp[0] = 1;//a[0]结尾的序列最长为1
        REP(i, 1, n) {
            if (a[i] == a[i - 1]) {
                dp[i] = dp[i - 1] + 1;
            } else {
                dp[i] = 1;
            }

        }
        cout << *max_element(dp, dp + n) << endl;
    }

    return 0;
}
